-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not trigger preview hooks if enable_previews is false #16099
Conversation
Can one of the admins verify this patch? |
@owncloud-bot it's okay to test this |
OC_Hook::connect('OC_Filesystem', 'post_delete', 'OC\Preview', 'post_delete_files'); | ||
OC_Hook::connect('\OCP\Versions', 'delete', 'OC\Preview', 'post_delete'); | ||
OC_Hook::connect('\OCP\Trashbin', 'delete', 'OC\Preview', 'post_delete'); | ||
if (\OC::$server->getSystemConfig()->getValue('enable_previews', false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should wrap the call to this method in line 657 instead of the complete content:
self::registerPreviewHooks();
A new inspection was created. |
I moved the check to init() |
@owncloud-bot this is okay to test |
@owncloud-bot retest this please |
Refer to this link for build results (access rights to CI server needed): |
👍 THX a lot @labkode |
@carlaschroder not sure if it is documented, so I just want to check back. We decided to not slow down oc unnecessarily. So we will not clear thumbnails, when an admin changes the setting. |
👍 |
Do not trigger preview hooks if enable_previews is false
Do not trigger preview hooks if enable_previews is false
Closes #15784